package com.ezops.models;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Transient;

@Entity
@Table(name = "EZOPS_GROUP")
public class Group implements  DomainEntity{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Id
	@Column(name = "GROUP_ID")
	public String groupId;
	@Column(name = "GROUP_NAME")
	public String groupName;

	@Column(name = "PARENT_GROUP_ID")
	public String parentGroupId;
	
	@OneToMany(fetch = FetchType.LAZY)
	private List<Resource> resources;
	
	
	public String getId() {
		return groupId;
	}
	public void setId(String id) {
		this.groupId = id;
	}
	public String getGroupName() {
		return groupName;
	}
	public void setGroupName(String groupName) {
		this.groupName = groupName;
	}
	public String getParentGroupId() {
		return parentGroupId;
	}
	public void setParentGroupId(String parentGroupId) {
		this.parentGroupId = parentGroupId;
	}
	public List<Resource> getResources() {
		return resources;
	}
	@Transient
	public String getGroupId() {
		return groupId;
	}
	@Transient
	public void setGroupId(String groupId) {
		this.groupId = groupId;
	}
	public void setResources(List<Resource> resources) {
		this.resources = resources;
	}
	
	
	

}
